package com.stockz.ui.swing.charting.widget;

import java.util.HashSet;
import java.util.Set;

import javax.swing.DefaultComboBoxModel;

import com.stockz.core.util.SpringUtil;
import com.stockz.ui.swing.charting.display.screen.AbstractDisplayableScreenConfiguration;
import com.stockz.ui.swing.widget.FilteredComboBox;

public class ScreenNameComboBox 
extends FilteredComboBox{
	private static final long serialVersionUID = 4829265837978401089L;

	private Set<AbstractDisplayableScreenConfiguration> screenSet = new HashSet<AbstractDisplayableScreenConfiguration>();
	
	public ScreenNameComboBox() {
		screenSet.clear();
		screenSet.addAll(SpringUtil.getApplicationContext().getBeansOfType(AbstractDisplayableScreenConfiguration.class).values());
		setModel(new DefaultComboBoxModel(screenSet.toArray()));
	}
}